package com.common;

import java.io.UnsupportedEncodingException;

import org.apache.log4j.Logger;

public class LOG {
	/**
     * �Ƿ�ת���־(UTF-8)
     */
    private static final int TRAN_FLAG = 0;
	
	/**
     * ����Ա��־��¼��
     */
    private static Logger FBLOG = Logger.getLogger("FBLOG");
    
    /**
     * ��¼ȫ��ͨ����־
     *
     * @param arg0
     */
    public static void FBINFO(String arg0) {
        if (TRAN_FLAG == 1) {
            try {
            	FBLOG.info(new String(arg0.getBytes(), "UTF-8"));
            } catch (UnsupportedEncodingException unex) {
            	FBLOG.info(arg0);
            }
        } else {
        	FBLOG.info(arg0);
        }
    }

    /**
     * ��¼ȫ��ͨ����־���쳣
     *
     * @param arg0
     * @param arg1
     */
    public static void FBINFO(String arg0, Throwable arg1) {
        if (TRAN_FLAG == 1) {
            try {
            	FBLOG.info(new String(arg0.getBytes(), "UTF-8"), arg1);
            } catch (UnsupportedEncodingException unex) {
            	FBLOG.info(arg0, arg1);
            }
        } else {
        	FBLOG.info(arg0, arg1);
        }
    }
}
